Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[SPARK-37258][K8S][BUILD] Upgrade kubernetes-client to 5.12.0 #34939

Closed
wants to merge 1 commit into from

Conversation

Yikun
Copy link
Member

@Yikun Yikun commented Dec 18, 2021

What changes were proposed in this pull request?

This patch aims to upgrade kubernetes-client from 5.10.2 to 5.12.0

Hightlight changes:

  • v5.12.0: Update Fabric8 Kubernetes Model to v1.23.0, bump jackson-datatype-jsr310 to 2.13.1.
  • v5.11.0: Introduce the Volcano extension, it would be useful for users who want to use Volcano as customized scheduler in Spark on K8S.
  • v5.11.0: Breaking change: an abstraction layer added over okHttp

There are also some changes to make sure it is compatiable to create http client with custom dispatcher according to fabric8io/kubernetes-client#3663 (comment) suggestion.

Why are the changes needed?

This will bring several bug fixes and improvements (such as volcano support, Fabric8 Kuberentes model 1.23 support), see more in:

Does this PR introduce any user-facing change?

No.

How was this patch tested?

  • Pass the CIs.
  • Running a spark-pi job to validate manually.

@github-actions github-actions bot added the BUILD label Dec 18, 2021
Copy link
Member

@dongjoon-hyun dongjoon-hyun left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Is it for Volcano?

Fix #3579: Add support for Volcano extension

@Yikun
Copy link
Member Author

Yikun commented Dec 18, 2021

There are some breaking changes in the API of k8s-cli v5.11, looks like it breaks to create httpclient with custom dispatcher like what we did here .

So we need to do some changes to make it work.

issue: fabric8io/kubernetes-client#3663

@SparkQA
Copy link

SparkQA commented Dec 18, 2021

Test build #146350 has finished for PR 34939 at commit 5b32fdf.

  • This patch fails to build.
  • This patch merges cleanly.
  • This patch adds no public classes.

@SparkQA
Copy link

SparkQA commented Dec 18, 2021

Kubernetes integration test unable to build dist.

exiting with code: 1
URL: https://amplab.cs.berkeley.edu/jenkins/job/SparkPullRequestBuilder-K8s/50824/

@Yikun
Copy link
Member Author

Yikun commented Dec 18, 2021

Is it for Volcano?

@dongjoon-hyun Yes. The volcano extesnion was introduced in k8s-cli v5.11.

@Yikun Yikun changed the title [SPARK-37258][K8S][Build] Upgrade kubernetes-client to 5.11.0. [SPARK-37258][K8S][BUILD] Upgrade kubernetes-client to 5.11.0 Dec 18, 2021
@SparkQA
Copy link

SparkQA commented Dec 18, 2021

Kubernetes integration test starting
URL: https://amplab.cs.berkeley.edu/jenkins/job/SparkPullRequestBuilder-K8s/50828/

@SparkQA
Copy link

SparkQA commented Dec 18, 2021

Kubernetes integration test status failure
URL: https://amplab.cs.berkeley.edu/jenkins/job/SparkPullRequestBuilder-K8s/50828/

@SparkQA
Copy link

SparkQA commented Dec 18, 2021

Test build #146354 has finished for PR 34939 at commit 4811c24.

  • This patch passes all tests.
  • This patch merges cleanly.
  • This patch adds no public classes.

@SparkQA
Copy link

SparkQA commented Dec 18, 2021

Kubernetes integration test starting
URL: https://amplab.cs.berkeley.edu/jenkins/job/SparkPullRequestBuilder-K8s/50835/

@SparkQA
Copy link

SparkQA commented Dec 18, 2021

Kubernetes integration test status failure
URL: https://amplab.cs.berkeley.edu/jenkins/job/SparkPullRequestBuilder-K8s/50835/

@SparkQA
Copy link

SparkQA commented Dec 18, 2021

Test build #146360 has finished for PR 34939 at commit 6d7451d.

  • This patch passes all tests.
  • This patch merges cleanly.
  • This patch adds no public classes.

@SparkQA
Copy link

SparkQA commented Dec 19, 2021

Kubernetes integration test starting
URL: https://amplab.cs.berkeley.edu/jenkins/job/SparkPullRequestBuilder-K8s/50846/

@SparkQA
Copy link

SparkQA commented Dec 19, 2021

Kubernetes integration test status failure
URL: https://amplab.cs.berkeley.edu/jenkins/job/SparkPullRequestBuilder-K8s/50846/

@Yikun
Copy link
Member Author

Yikun commented Dec 19, 2021

Retest this please

@SparkQA
Copy link

SparkQA commented Dec 19, 2021

Test build #146372 has finished for PR 34939 at commit 5b1ab40.

  • This patch passes all tests.
  • This patch merges cleanly.
  • This patch adds no public classes.

@SparkQA
Copy link

SparkQA commented Dec 19, 2021

Kubernetes integration test starting
URL: https://amplab.cs.berkeley.edu/jenkins/job/SparkPullRequestBuilder-K8s/50847/

@SparkQA
Copy link

SparkQA commented Dec 19, 2021

Kubernetes integration test status failure
URL: https://amplab.cs.berkeley.edu/jenkins/job/SparkPullRequestBuilder-K8s/50847/

@SparkQA
Copy link

SparkQA commented Dec 19, 2021

Test build #146373 has finished for PR 34939 at commit 5b1ab40.

  • This patch passes all tests.
  • This patch merges cleanly.
  • This patch adds no public classes.

@Yikun Yikun marked this pull request as ready for review December 20, 2021 02:45
@Yikun Yikun marked this pull request as draft December 20, 2021 02:50
@Yikun Yikun marked this pull request as ready for review December 20, 2021 03:07
@@ -68,6 +69,8 @@ private[spark] object SparkKubernetesClientFactory extends Logging {
.getOption(s"$kubernetesAuthConfPrefix.$CLIENT_KEY_FILE_CONF_SUFFIX")
val clientCertFile = sparkConf
.getOption(s"$kubernetesAuthConfPrefix.$CLIENT_CERT_FILE_CONF_SUFFIX")
// TODO(SPARK-37687): clean up direct usage of OkHttpClient, see also:
Copy link
Member Author

@Yikun Yikun Dec 20, 2021

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Here are some backgroud on this note (also add the jira: SPARK-37687):

So, we'd better to consider to cleanup okhttpclient direct usage in some right time and use the httpclient which kubernetes client diret supported to reduce the potential risk in future upgrade.

@SparkQA
Copy link

SparkQA commented Dec 20, 2021

Kubernetes integration test starting
URL: https://amplab.cs.berkeley.edu/jenkins/job/SparkPullRequestBuilder-K8s/50861/

@SparkQA
Copy link

SparkQA commented Dec 20, 2021

Kubernetes integration test status failure
URL: https://amplab.cs.berkeley.edu/jenkins/job/SparkPullRequestBuilder-K8s/50861/

@Yikun Yikun marked this pull request as draft December 20, 2021 06:12
@SparkQA
Copy link

SparkQA commented Dec 20, 2021

Test build #146386 has finished for PR 34939 at commit ecd15cb.

  • This patch fails SparkR unit tests.
  • This patch merges cleanly.
  • This patch adds no public classes.

@Yikun Yikun marked this pull request as ready for review December 20, 2021 06:58
@Yikun
Copy link
Member Author

Yikun commented Dec 20, 2021

@Yikun
Copy link
Member Author

Yikun commented Dec 20, 2021

retest this please

@SparkQA
Copy link

SparkQA commented Dec 20, 2021

Kubernetes integration test starting
URL: https://amplab.cs.berkeley.edu/jenkins/job/SparkPullRequestBuilder-K8s/50864/

@SparkQA
Copy link

SparkQA commented Dec 20, 2021

Kubernetes integration test status failure
URL: https://amplab.cs.berkeley.edu/jenkins/job/SparkPullRequestBuilder-K8s/50864/

@SparkQA
Copy link

SparkQA commented Dec 20, 2021

Test build #146389 has finished for PR 34939 at commit ecd15cb.

  • This patch passes all tests.
  • This patch merges cleanly.
  • This patch adds no public classes.

Copy link
Member

@dongjoon-hyun dongjoon-hyun left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Actually, I'm a little reluctant due to the breaking change. Shall we hold on and see the next release?

@Yikun
Copy link
Member Author

Yikun commented Dec 23, 2021

@dongjoon-hyun Thanks for review. I can understand your concerns for sure, it makes sense to wait for next release to avoid pontential flaky factor of breaking changes.

But there is one thing I need to clarify, even in the next version we will still face these changes to make okhttpclient work. BTW, these changes are changed according to fabric8io/kubernetes-client#3663 (comment) .

@klaus-xiong
Copy link
Contributor

@Yikun Do you have a time line for the 'Cleanup direct usage of OkHttpClient' ?

@Yikun
Copy link
Member Author

Yikun commented Dec 23, 2021

@klaus-xiong I think the deadline depends on when new better httpclient to replace okhttpclient are supported in k8s client, and also this replacement meet the requirement of Spark on K8S.

It bring some potential issue when k8s-cli to stop okhttpclient support (as fabric8io/kubernetes-client#3547 mentioned, OkHttpClient has some known issue and it's not easy to upgrade OkHttpClient), it may not be a good choice if we still keep the direct OkHttpClient usage in Spark.

@Yikun Yikun changed the title [SPARK-37258][K8S][BUILD] Upgrade kubernetes-client to 5.11.0 [SPARK-37258][K8S][BUILD] Upgrade kubernetes-client to 5.11.1 Dec 27, 2021
@Yikun Yikun force-pushed the SPARK-37258 branch 2 times, most recently from 1bf6aac to 65118f6 Compare January 1, 2022 00:28
dongjoon-hyun added a commit that referenced this pull request Jan 12, 2022
### What changes were proposed in this pull request?

This PR aims to upgrade K8s client library to 5.10.2 from 5.10.1.

### Why are the changes needed?

This is a maintenance version upgrade which brings the following fix.
- fabric8io/kubernetes-client@4451030

Please note that this is different from #34939 (5.11.1) which has a breaking change.
In addition, the above bug fix is in `5.10.2` and `5.11.2`, not in `5.11.1`.

### Does this PR introduce _any_ user-facing change?

No.

### How was this patch tested?

Pass the CI.

Closes #35182 from dongjoon-hyun/SPARK-37884.

Authored-by: Dongjoon Hyun <[email protected]>
Signed-off-by: Dongjoon Hyun <[email protected]>
@Yikun Yikun force-pushed the SPARK-37258 branch 2 times, most recently from 88a83c3 to 444ccae Compare January 19, 2022 02:30
@Yikun Yikun changed the title [SPARK-37258][K8S][BUILD] Upgrade kubernetes-client to 5.11.1 [SPARK-37258][K8S][BUILD] Upgrade kubernetes-client to 5.11.2 Jan 19, 2022
dchvn pushed a commit to dchvn/spark that referenced this pull request Jan 19, 2022
### What changes were proposed in this pull request?

This PR aims to upgrade K8s client library to 5.10.2 from 5.10.1.

### Why are the changes needed?

This is a maintenance version upgrade which brings the following fix.
- fabric8io/kubernetes-client@4451030

Please note that this is different from apache#34939 (5.11.1) which has a breaking change.
In addition, the above bug fix is in `5.10.2` and `5.11.2`, not in `5.11.1`.

### Does this PR introduce _any_ user-facing change?

No.

### How was this patch tested?

Pass the CI.

Closes apache#35182 from dongjoon-hyun/SPARK-37884.

Authored-by: Dongjoon Hyun <[email protected]>
Signed-off-by: Dongjoon Hyun <[email protected]>
Copy link
Member

@dongjoon-hyun dongjoon-hyun left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thank you for your patience. Could you update this PR with 5.12.0? After that, I believe it's time to merge.

Update Fabric8 Kubernetes Model to v1.23.0

@Yikun
Copy link
Member Author

Yikun commented Jan 25, 2022

@dongjoon-hyun Sure, will upgrade soon. Thanks!

@dongjoon-hyun
Copy link
Member

Thanks!

@Yikun Yikun changed the title [SPARK-37258][K8S][BUILD] Upgrade kubernetes-client to 5.11.2 [SPARK-37258][K8S][BUILD] Upgrade kubernetes-client to 5.12.0 Jan 25, 2022
Copy link
Member

@dongjoon-hyun dongjoon-hyun left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

+1, LGTM. Thank you, @Yikun .
Merged to master for Apache Spark 3.3.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants